<!DOCTYPE HTML>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/head :: commonHead('付款')">
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-car-add" >
	<div class="row cl" style="
    padding-left: 88px;
">
        <img src="/moban/images/QRCode.png" width="200" alt=""/>
	</div>
	<div class="row cl">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
            <input type="hidden" th:value="${orderId}" class="inp"/>
            <a   class="btn btn-primary radius"  onclick="QR_submit(this,'/order/jiesuan')"  >&nbsp;&nbsp;提交&nbsp;&nbsp;</a>
<!--			<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;"/>-->
		</div>
	</div>
	</form>
</article>

<!-- 引入公共js -->
<span th:include="/common/on-load-js :: commonOnLoadJs"></span>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" th:src="@{/lib/My97DatePicker/4.8/WdatePicker.js}"></script>
<script type="text/javascript" th:src="@{/lib/jquery.validation/1.14.0/jquery.validate.js}"></script> 
<script type="text/javascript" th:src="@{/lib/jquery.validation/1.14.0/validate-methods.js}"></script> 
<script type="text/javascript" th:src="@{/lib/jquery.validation/1.14.0/messages_zh.js}"></script> 
<script type="text/javascript">
$(function(){
	
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});




});



function QR_submit(obj,url){
    var orderId = $(obj).parent().find(".inp").val();
    var urltmp = url+"?id="+orderId;
    $.ajax({
        type: 'get',
        url: urltmp,
        dataType: 'json',
        success: function(data){
            console.log();
            if(data.res==0){
                layer.msg('结算成功!',{icon:1,time:1000});
                setTimeout(function() {
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.window.location.reload();
                    parent.layer.close(index);
                }, "1000");
            }else{
                layer.msg('结算失败!',{icon: 2,time:1000});
            }
        }
    });
}

</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>